import request from "@/utils/request"
//获取商品分类列表
export const getCategory = (params: any) => {
    return request({
        url: '/marketers/category/list',
        method: 'get',
        params: params
    })
}
//获取商品分类详情
export const getCategoryDetail = (categoryId: number) => {
    return request({
        url: `/marketers/category/${categoryId}`,
        method: 'get'
    })
}
//新增商品
export const addCategory = (data: object) => {
    return request({
        url: "/marketers/category/add",
        method: 'post',
        data: data
    })
}
//删除商品分类
export const deleteCategorys = (ids: [number]) => {
    return request({
        url: `/marketers/category/${ids}`,
        method: 'delete'
    })
}
//改商品分类
export const upCategory = (data: object) => {
    return request({
        url: "/marketers/category/up",
        method: 'put',
        data: data
    })
}
